<?php
// File Security Check
if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) :
	die ( 'You do not have sufficient permissions to access this page!' );
endif;

get_header(); ?>

<hgroup class="page-head">
	<header class="main-title col-full">
            <div class="left">
		<h1 class="entry-title"><?php the_title(); ?></h1>
            </div>
            <div class="right breadcrumbs">
                <?php if(function_exists('bcn_display'))
                {
                    bcn_display();
                }?>
            </div>
	</header>
</hgroup>

<!-- BEGIN #container -->
<div id="container" class="clearfix">

    <!-- BEGIN #content -->
    <section id="content" class="<?php echo $post->post_name; ?>">

    <?php if ( have_posts() ) : ?>

        <?php while ( have_posts() ) : the_post(); ?>

            <div class="entry clearfix">

                <?php
                    $embed = get_post_meta( $id, 'embed', true );
                    $video_class = '';

                    if ( $embed != '' ):
                        echo nice_embed( array ( 'id' => get_the_ID() ) );
                        $video_class = ' has-video';
                    elseif ( has_post_thumbnail() ) : ?>

                        <figure class="featured-image">
                            <?php nice_image( array( 'width' => 480, 'height' => 480, 'class' => 'wp-post-image' ) ); ?>
                        </figure>

                <?php endif; ?>

                <div class="post-content<?php echo $video_class; ?>">
                    <?php the_content( __( 'Continue reading', 'nicethemes' ) . ' &raquo;' ); ?>
                    <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'nicethemes' ), 'after' => '</div>' ) ); ?>
                </div>

            </div>

        <?php endwhile; ?>

    <?php else : ?>

        <header>
                <h2><?php _e( 'Not Found', 'nicethemes' ); ?></h2>
        </header>
        <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'nicethemes' ); ?></p>

        <?php get_search_form(); ?>

    <?php endif; ?>

    <!-- END #content -->
    </section>

    <!-- BEGIN #sidebar -->
    <aside id="sidebar" role="complementary">

        <?php if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar( 'Primary' ) ) :
                dynamic_sidebar('Service Sidebar');
            endif; ?>

    <!-- END #sidebar -->
    </aside>

<!-- END #container -->
</div>

<?php get_footer(); ?>